package com.lhkj.ct.wechat.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
  * <p>
  *     描述：扫码进入系统
  * </p>
  */
@RestController
@RequestMapping("api/wechat/scan")
@Api(tags = {"5.扫码进入"})
public class WxMpScanController {

    private static final Logger logger = LoggerFactory.getLogger(WxMpScanController.class);

    @ApiOperation(value = "扫码作答")
    @ApiOperationSupport(order = 1)
    @GetMapping(value = "qrcode")
    public void scaleAllot(@RequestParam String code, @RequestParam(required = false) String url, HttpServletResponse response) throws IOException {
        logger.debug("扫码作答回调，code:{}, url:{}", code, url);
    }

}
